package cn.xwt.weidisk.mapper;

import cn.xwt.weidisk.pojo.dao.RecycleDo;
import cn.xwt.weidisk.pojo.dao.RecycleFileDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 薛慰涛
 */
public interface RecycleMapper {

    /**
     * 保存recycle
     * @param recycle uid, fid
     * @return int
     */
    int insertRecycle(RecycleDo recycle);

    /**
     * 通过uid查询回收站记录
     * @param uid 用户id
     * @return List<RecycleDo>
     */
    List<RecycleFileDo> selectRecycleList(@Param("uid") Long uid);

    /**
     * 根据id删除recycle
     * @param id rid
     * @param uid uid
     */
    void deleteRecycle(@Param("id") Long id, @Param("uid") Long uid);

    /**
     * 查询recycle中的所有记录
     * @return List<RecycleDo>
     */
    List<RecycleDo> selectAllRecycleList();
}
